<template>
    <div class="container">
        <mt-header fixed title="工作流程" id="header1"></mt-header>
        <!-- navbar -->
        <mt-navbar class="tab" v-model="checked">
            <mt-tab-item id="workList">任务清单</mt-tab-item>
            <mt-tab-item id="workPlan">工作计划</mt-tab-item>
            <mt-tab-item id="workDone">任务实施</mt-tab-item>
        </mt-navbar>
        <mt-tab-container v-model="checked" id="container_work">
             <!-- 任务清单 内容 -->
            <mt-tab-container-item id="workList">
                <el-dialog title="查询任务清单" :visible.sync="dialogFormVisible11">
                     <el-form ref="form" :model="taskData" label-width="80px">
                        <el-form-item label="任务名称">
                            <el-input v-model="taskData.taskName" placeholder="任务名称" style="width:85%"></el-input>
                        </el-form-item>
                        <el-form-item label="任务类型">
                            <el-select v-model="query1">
                                <el-option v-for="(item,index) in taskData.taskType" :key="index" :label="item.name" :value="item.code"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="海事局">
                            <el-select v-model="query2" @change="selectItem">
                                <el-option v-for="(item,index) in taskData.marineBoardCode" :key="index" :label="item.orgName" :value="item.orgName"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="雷达站">
                            <el-select v-model="query3">
                                <el-option v-for="(item,index) in taskData.radarStationCode" :key="index" :label="item.orgName" :value="item.orgCode"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="任务状态">
                            <el-select v-model="query4">
                                <el-option  v-for="(item,index) in taskData.taskStatus" :key="index" :label="item.name" :value="item.code"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="审核状态">
                            <el-select v-model="query5">
                                <el-option v-for="(item,index) in taskData.auditStatus" :key="index" :label="item.name" :value="item.code"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="开始时间">
                            <el-col>
                                <el-date-picker type="date" placeholder="yy-mm-dd" v-model="taskData.startDate" style="width: 85%;"></el-date-picker>
                            </el-col>
                        </el-form-item>
                        <el-form-item label="结束时间">    
                            <el-col>
                                <el-date-picker type="date" placeholder="yy-mm-dd" v-model="taskData.endDate" style="width: 85%;"></el-date-picker>
                            </el-col>
                        </el-form-item>
                        <el-form-item id="el_form">
                            <el-button type="primary" @click="getTask">查询</el-button>
                            <el-button type="primary" @click="dialogFormVisible11 =false">取消</el-button>
                        </el-form-item>
                    </el-form>
                </el-dialog>
               
                <!-- 任务清单列表 -->
                <div class="task">
                    <p>任务清单列表</p>
                    <el-collapse accordion v-for="(item,index) in taskList" :key="index">
                        <el-collapse-item :title="item.marineBoardCodeText+'----'+item.taskSn" :name="index">
                            <div @click="watchTaskList(item.taskSn,index)">任务系列号: <span class="act">{{item.taskSn}}</span></div>
                            <div>任务名称: {{item.taskName}}</div>
                            <div>任务类型: {{item.taskTypeText}}</div>
                            <div>实施对象: {{item.implementDestText}}</div>
                            <div>海事局: {{item.marineBoardCodeText}}</div>
                            <div>雷达站: {{item.radarStationCodeText}}</div>
                            <div>任务内容: {{item.taskContent}}</div>
                            <div>任务来源: {{item.taskSourceText}}</div>
                            <div>执行人: {{item.executorId}}</div>
                            <div>创建人: {{item.presenter}}</div>
                            <div>任务状态: {{item.taskStatusText}}</div>
                            <div>审核状态: {{item.auditStatusText}}</div>
                            <div>工作量(天): {{item.workload}}</div>
                            <div>计划实施时间: {{format(item.planImplementDate)}}</div>
                        </el-collapse-item>
                    </el-collapse>
                    <div class="dataLength"><i class="iconfont icon-jiufuqianbaoicon14"></i>第<span>{{page1}}</span>页，每次显示10条数据，当前显示共<span> {{taskList.length}} </span>条数据</div>
                    <div class="page">
                        <el-button type="primary"  class="prev" :disabled="isDisabled" @click="prevPage"><i class="iconfont el-icon-arrow-left"></i>上一页</el-button>
                        <el-button type="primary"  class="next" :disabled="isDisabled1" @click="nextPage"><i class="iconfont el-icon-arrow-right"></i>下一页</el-button>
                        <el-button type="success" @click="getTaskInfo"><i class="iconfont el-icon-search"></i>查询</el-button>
                        <el-button type="success" @click="addInfo"><i class="iconfont el-icon-plus"></i>新增</el-button>
                    </div>
                    <!-- 任务清单查看 弹窗 -->
                    <el-dialog title="任务清单" :visible.sync="dialogFormVisible4">
                        <el-form :model="watchList">
                            <el-form-item label="任务名称" :label-width="formLabelWidth1">
                                <el-input v-model="watchList.taskName" disabled></el-input>
                            </el-form-item>
                            <el-form-item label="任务类型" :label-width="formLabelWidth1">
                                <el-input v-model="watchList.taskType" disabled></el-input>
                            </el-form-item>
                            <el-form-item label="海事局" :label-width="formLabelWidth1">
                                <el-input v-model="watchList.marineBoard" disabled></el-input>
                            </el-form-item>
                            <el-form-item label="雷达站" :label-width="formLabelWidth1">
                                <el-input v-model="watchList.radarStation" disabled></el-input>
                            </el-form-item>
                            <el-form-item label="实施对象" :label-width="formLabelWidth1">
                                <el-input v-model="watchList.implementDest" disabled></el-input>
                            </el-form-item>
                            <el-form-item label="实施开始时间" :label-width="formLabelWidth1">
                                <el-col >
                                    <el-date-picker type="date" placeholder="yy-mm-dd" v-model="watchList.startDate" 
                                    style="width: 85%;" ></el-date-picker>
                                </el-col>
                            </el-form-item>
                             <el-form-item label="实施结束时间" :label-width="formLabelWidth1">
                                <el-col >
                                    <el-date-picker type="date" placeholder="yy-mm-dd" v-model="watchList.endDate" 
                                    style="width: 85%;" ></el-date-picker>
                                </el-col>
                            </el-form-item>
                            <el-form-item label="实施对象" :label-width="formLabelWidth1">
                                <el-input v-model="watchList.implementDest"></el-input>
                            </el-form-item>
                             <el-form-item label="海事局审核人" :label-width="formLabelWidth1">
                                <el-input v-model="watchList.auditPerson"></el-input>
                            </el-form-item>
                            <el-form-item label="任务内容" :label-width="formLabelWidth1">
                                <el-input  type="textarea" v-model="watchList.taskContent" :rows="4"></el-input>
                            </el-form-item>
                        </el-form>
                        <div slot="footer" class="dialog-footer">
                            <el-button type="primary" plain @click="dialogFormVisible4= false">关闭</el-button>
                        </div>
                    </el-dialog>
                </div>
            </mt-tab-container-item>
            <!-- 工作计划 内容 -->
            <mt-tab-container-item id="workPlan">
                <el-dialog title="查询工作计划" :visible.sync="dialogFormVisible12">
                    <el-form ref="form" :model="workData" label-width="80px">
                        <el-form-item label="任务名称">
                            <el-input v-model="workData.taskName" placeholder="任务名称" style="width:85%"></el-input>
                        </el-form-item>
                        <el-form-item label="活动类型">
                            <el-select v-model="query6">
                                <el-option v-for="(item,index) in taskData.taskType" :key="index" :label="item.name" :value="item.code"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="海事局">
                            <el-select v-model="query7" @change="selectItem2">
                                <el-option v-for="(item,index) in taskData.marineBoardCode" :key="index" :label="item.orgName" :value="item.orgName"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="雷达站">
                            <el-select v-model="query8">
                                <el-option v-for="(item,index) in taskData.radarStationCode" :key="index" :label="item.orgName" :value="item.orgCode"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="任务状态">
                            <el-select v-model="query9">
                                <el-option  v-for="(item,index) in taskData.taskStatus" :key="index" :label="item.name" :value="item.code"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="审核状态">
                            <el-select v-model="query10">
                                <el-option v-for="(item,index) in taskData.auditStatus" :key="index" :label="item.name" :value="item.code"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="开始时间">
                            <el-col>
                                <el-date-picker type="date" placeholder="yy-mm-dd" v-model="workData.startDate" style="width: 80%;"></el-date-picker>
                            </el-col>
                        </el-form-item>
                        <el-form-item label="结束时间">
                            <el-col>
                                <el-date-picker type="date" placeholder="yy-mm-dd" v-model="workData.endDate" style="width: 80%;"></el-date-picker>
                            </el-col>
                        </el-form-item>
                        <el-form-item id="el_form">
                            <el-button type="primary" @click='getWorkList'>查询</el-button>
                            <el-button type="primary" @click="dialogFormVisible12=false">取消</el-button>
                        </el-form-item>
                    </el-form>
                </el-dialog>
                <div class="task">
                    <p>工作计划列表</p>
                    <el-collapse v-for="(item,index) in workList" :key="index">
                        <el-collapse-item :title="item.marineBoardCodeText+'----'+item.taskSn" :name="index">
                            <div class="act" @click="editPlan(index,item.taskSn)">任务系列号：{{item.taskSn}}</div>
                            <div>任务序列号：{{item.taskName}}</div>
                            <div>任务名称：{{item.taskTypeText}}</div>
                            <div>计划实施时间：{{format(item.planImplementDate)}}</div>
                            <div>实施对象：{{item.implementDestText}}</div>
                            <div>海事局：{{item.marineBoardCodeText}}</div>
                            <div>雷达站：{{item.radarStationCodeText}}</div>
                            <div>任务内容：{{item.taskContent}}</div>
                            <div>任务状态：{{item.taskStatusText}}</div>
                            <div>审核状态：{{item.auditStatusText}}</div>
                            <div>审核意见：{{item.auditCommentHsj}}</div>
                            <div>审核人：{{item.auditor}}</div>
                            <div>执行人：{{item.executorId}}
                                <el-button  
                                v-if="item.taskStatusText !=='实施中'"     
                                type="primary"
                                size='mini'
                                circle icon="el-icon-plus"
                                @click="addPerson(item.taskSn,index)">
                                </el-button>
                                <span v-if="item.executorId == undefined">未分配</span>
                            </div>
                            <div>抄送人：{{item.ccUserId}}
                                <el-button  v-if="item.taskStatusText !=='实施中'"
                                 type="primary"
                                 size='mini'
                                 circle icon="el-icon-plus" 
                                 @click="findCcUser(item.taskSn,index)">
                                 </el-button>
                                 <span v-if="item.ccUserId == undefined">未分配</span>
                            </div>
                            <div class="planBtn">
                                <el-button type="primary"  
                                @click="carryPlan(item.taskSn,item.executorId,item.ccUserId,index)" 
                                :disabled="item.taskStatusText =='实施中'">
                                执行计划
                                </el-button>
                            </div>
                        </el-collapse-item>
                    </el-collapse>
                     <div class="dataLength"><i class="iconfont icon-jiufuqianbaoicon14"></i>第<span>{{page2}}</span>页，每次显示10条数据，当前显示共<span> {{workList.length}} </span>条数据</div>
                    <div class="page">
                        <el-button type="primary" class="prev" :disabled="isDisabled2" @click="prev"><i class="iconfont el-icon-arrow-left"></i>上一页</el-button>
                        <el-button type="primary" class="next" :disabled="isDisabled3" @click="next"><i class="iconfont el-icon-arrow-right"></i>下一页</el-button>
                        <el-button type="success" @click="getWorkInfo"><i class="iconfont el-icon-search"></i>查询</el-button>
                    </div>
                </div>
                  <!-- 添加执行人 弹窗 -->
                 <el-dialog title="添加执行人" :visible.sync="dialogFormVisible1">
                    <el-form>
                        <el-form-item label="选择执行任务的人员" :label-width="formLabelWidth1">
                            <!-- :cell-style="cellStyle" -->
                            <el-table :data="personList"  border style="width: 100%" id="addPerson" @select="selectPerson">
                                <el-table-column type="selection"></el-table-column>
                                <el-table-column type="index"></el-table-column>
                                <el-table-column  prop="userName" label="用户名称"></el-table-column>
                                <el-table-column  prop="loginName"  label="登陆ID"></el-table-column>
                                <el-table-column  prop="text"  label="人员状态" width="120" class="txt"></el-table-column>
                                <el-table-column  prop="roleId"  label="角色"></el-table-column>
                                <el-table-column  prop="phone"  label="手机" width="120"></el-table-column>
                            </el-table>
                        </el-form-item>
                    </el-form>
                    <div>提示:向右滑动查看详细信息</div>
                    <div slot="footer" class="dialog-footer">
                        <el-button type="primary"  class="prev">上一页</el-button>
                        <el-button type="primary"  class="next">下一页</el-button>
                        <el-button type="primary"  @click="updatePerson">保存</el-button>
                        <el-button type="primary"  @click="dialogFormVisible1= false">关闭</el-button>
                    </div>
                </el-dialog>
                 <!-- 添加抄送人 弹窗 -->
                 <el-dialog title="添加抄送人" :visible.sync="dialogFormVisible">
                    <el-form>
                        <el-form-item label="选择执行任务的人员" :label-width="formLabelWidth1">
                            <el-table :data="userList"  border style="width: 100%" id="addPerson"  @select="selectUser">
                                <el-table-column type="selection"></el-table-column>
                                <el-table-column type="index"></el-table-column>
                                <el-table-column  prop="userName" label="用户名称"></el-table-column>
                                <el-table-column  prop="loginName"  label="登陆ID"></el-table-column>
                                <el-table-column  prop="roleId"  label="角色"></el-table-column>
                                <el-table-column  prop="phone"  label="手机" width="120"></el-table-column>
                            </el-table>
                        </el-form-item>
                    </el-form>
                    <div>提示:向右滑动查看详细信息</div>
                    <div slot="footer" class="dialog-footer">
                        <el-button type="primary"  class="prev">上一页</el-button>
                        <el-button type="primary"  class="next">下一页</el-button>
                        <el-button type="primary"  @click="updateUser">保存</el-button>
                        <el-button type="primary"  @click="dialogFormVisible= false">关闭</el-button>
                    </div>
                </el-dialog>
                 <!-- 编辑工作计划 弹窗 -->
                 <el-dialog title="任务清单" :visible.sync="dialogFormVisible5">
                    <el-form :model="checkList">
                        <el-form-item label="任务名称" :label-width="formLabelWidth1">
                            <el-input v-model="checkList.taskName" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="任务类型" :label-width="formLabelWidth1">
                            <el-input v-model="checkList.taskType" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="海事局" :label-width="formLabelWidth1">
                            <el-input v-model="checkList.marineBoard" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="雷达站" :label-width="formLabelWidth1">
                            <el-input v-model="checkList.radarStation" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="实施对象" :label-width="formLabelWidth1">
                            <el-input v-model="checkList.implementDest" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="实施时间" :label-width="formLabelWidth1">
                            <el-col >
                                <el-date-picker type="date" placeholder="yy-mm-dd" v-model="checkList.planImplementDate" 
                                style="width: 85%;" ></el-date-picker>
                            </el-col>
                        </el-form-item>
                         <el-form-item label="工作量(天)" :label-width="formLabelWidth1">
                            <el-input v-model="checkList.workload"></el-input>
                        </el-form-item>
                        <el-form-item label="任务内容" :label-width="formLabelWidth1">
                            <el-input  type="textarea" v-model="checkList.taskContent" :rows="4"></el-input>
                        </el-form-item>
                    </el-form>
                    <div slot="footer" class="dialog-footer">
                        <el-button type="primary" plain @click="updateRwqds">保存</el-button>
                        <el-button type="primary" plain @click="dialogFormVisible5= false">关闭</el-button>
                    </div>
                </el-dialog>
            </mt-tab-container-item>
            <!-- 任务实施 内容 -->
            <mt-tab-container-item id="workDone">
                <el-dialog title="查询任务实施列表" :visible.sync="dialogFormVisible13">
                    <el-form ref="form" :model="carryTask" label-width="80px">
                        <el-form-item label="设备名称">
                            <el-input v-model="carryTask.taskName" placeholder="设备名称" style="width:85%"></el-input>
                        </el-form-item>
                        <el-form-item label="活动类型">
                            <el-select v-model="query11">
                                <el-option v-for="(item,index) in taskData.taskType" :key="index" :label="item.name" :value="item.code"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="海事局">
                            <el-select v-model="query12" @change="selectItem3">
                                <el-option v-for="(item,index) in taskData.marineBoardCode" :key="index" :label="item.orgName" :value="item.orgName"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="雷达站">
                            <el-select v-model="query13">
                            <el-option v-for="(item,index) in taskData.radarStationCode" :key="index" :label="item.orgName" :value="item.orgCode"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="任务状态">
                            <el-select v-model="query14">
                                <el-option  v-for="(item,index) in taskData.taskStatus" :key="index" :label="item.name" :value="item.code"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="审核状态">
                            <el-select v-model="query15">
                                <el-option v-for="(item,index) in taskData.auditStatus" :key="index" :label="item.name" :value="item.code"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="开始时间">
                            <el-col>
                                <el-date-picker type="date" placeholder="yy-mm-dd" v-model="carryTask.startDate" style="width: 80%;"></el-date-picker>
                            </el-col>
                        </el-form-item>
                        <el-form-item label="结束时间">
                            <el-col>
                                <el-date-picker type="date" placeholder="yy-mm-dd" v-model="carryTask.endDate" style="width: 80%;"></el-date-picker>
                            </el-col>
                        </el-form-item>
                        <el-form-item id="el_form">
                            <el-button type="primary" @click="carryTaskList">查询</el-button>
                            <el-button type="primary" @click="dialogFormVisible13 = false">取消</el-button>
                        </el-form-item>
                    </el-form>  
                </el-dialog>
                <div class="zsk" v-if="hidden">
                    <p>移植知识库</p>
                    <el-input v-model="carryTask.endDate" style="width:85%" @focus="getDevice">
                        <i slot="suffix" class="el-input__icon el-icon-edit"></i>
                    </el-input>
                </div>
                <div class="task">
                    <p>任务实施列表</p>
                    <el-collapse>
                        <el-collapse-item :title="item.hsjName+'----'+item.taskSn" :name="index" v-for="(item,index) in carryList" :key="index">
                            <div>雷达站 :{{item.ldzName}}</div>
                            <div>任务状态: {{item.taskStatusText}}</div>
                            <div>审核状态:{{item.auditStatusText}}</div>
                            <div @click="checkQdan(index,item.taskSn)"><span class="act">任务系列号: {{item.taskSn}}</span></div>
                            <div>
                                <span @click="getXjReportList(item.taskSn)">工作报告:</span>
                                
                                <span v-if="flag">
                                    <el-button type="primary" size="mini" circle 
                                    @click="addReport(item.taskSn,item.hsjName,item.marineBoardCode,item.ldzName,item.nodeCode,item.auditStatus)"
                                     icon="el-icon-plus">
                                    </el-button>
                                </span>
                                <div class="act" v-if="!flag">
                                    <span @click="watchReport(item.taskSn,item.taskType,index)">{{item.taskTypeText}}</span>
                                    <el-button type="primary" size="mini" circle icon="el-icon-close"></el-button>
                                </div>
                                
                            </div>
                            <div v-if="hidden">
                                <el-radio v-model="isChecked" @change="getChecked" :label="item.taskSn">是否移植到知识库</el-radio>
                            </div>
                        </el-collapse-item>
                    </el-collapse>
                    <div class="dataLength"><i class="iconfont icon-jiufuqianbaoicon14"></i>第<span>{{page3}}</span>页，每次显示10条数据，当前显示共<span> {{carryList.length}} </span>条数据</div>
                    <div class="page">
                        <el-button type="primary"  size="medium" class="prev" :disabled="isDisabled4" @click="getPrevPage"><i class="iconfont el-icon-arrow-left"></i>上一页</el-button>
                        <el-button type="primary"  size="medium" class="next" :disabled="isDisabled5" @click="getNextPage"><i class="iconfont el-icon-arrow-right"></i>下一页</el-button>
                        <el-button type="success" @click="getListInfo"><i class="iconfont el-icon-search"></i>查询</el-button>
                    </div>
                </div>
                <!-- 选中报告类型 -->
                <el-dialog title="选中报告类型" :visible.sync="dialogFormVisible7">
                    <el-form>
                        <el-form-item label="报告类型" :label-width="formLabelWidth1">
                            <el-select v-model="query16" style="width:100%">
                                <el-option v-for="(item,index) in selectReport" :key="index" :label="item.name" :value="item.code"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-form>
                    <div slot="footer" class="dialog-footer">
                        <el-button type="primary" @click="saveResult">确定</el-button>
                        <el-button type="primary" @click="dialogFormVisible7= false">关闭</el-button>
                    </div>
                </el-dialog>
                <!-- 新增维修报告 -->
                <el-dialog title="维修报告填报" :visible.sync="dialogFormVisible8">
                    <el-form :model="WxReport" :rules="rules" ref="formModel">
                        <el-form-item label="服务报告编号" :label-width="formLabelWidth1" prop="reportCode">
                            <el-input v-model="WxReport.reportCode" :disabled="true"></el-input>
                        </el-form-item>
                        <el-form-item label="用户" :label-width="formLabelWidth1" prop="customer">
                            <el-input v-model="WxReport.customer"></el-input>
                        </el-form-item>
                        <el-form-item label="地点" :label-width="formLabelWidth1" prop="site">
                            <el-input v-model="WxReport.site"></el-input>
                        </el-form-item>
                        <el-form-item label="日期" :label-width="formLabelWidth1" prop="serviceDate">
                                <el-col >
                                <el-date-picker type="date" placeholder="yy-mm-dd" v-model="WxReport.serviceDate" 
                                style="width: 85%;" ></el-date-picker>
                            </el-col>
                        </el-form-item>
                        <el-form-item label="服务工程师" :label-width="formLabelWidth1" prop="servicEngineer">
                            <el-input v-model="WxReport.servicEngineer" @focus="getWxEngineer">
                                 <i
                                    class="el-icon-edit el-input__icon"
                                    slot="suffix"
                                   >
                                </i>
                            </el-input>
                        </el-form-item>
                        <el-form-item label="服务项目" :label-width="formLabelWidth1">
                            <el-radio-group v-model="WxReport.installation"  class="radioCheck" @change="selectInstal">
                                <el-radio :label="item.label" v-for="(item,index) in isInstallation" :key="index">{{item.value}}</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="状态描述" :label-width="formLabelWidth1" prop="statusDescript">
                            <el-input  type="textarea" v-model="WxReport.statusDescript"></el-input>
                        </el-form-item>
                        <el-form-item label="故障描述" :label-width="formLabelWidth1" prop="problemDescript">
                            <el-input  type="textarea" v-model="WxReport.problemDescript" :rows="4"></el-input>
                        </el-form-item>
                        <el-form-item label="处理措施" :label-width="formLabelWidth1" prop="correctiveAction">
                            <el-input  type="textarea" v-model="WxReport.correctiveAction" :rows="4"></el-input>
                        </el-form-item>
                        <el-form-item label="是否需要后续工作" :label-width="formLabelWidth1">
                            <el-radio-group v-model="WxReport.furtherActionRequired" class="radioCheck" @change="selectFurther">
                                <el-radio :label="item.label" v-for="(item,index) in isNeed" :key="index">{{item.value}}</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="遗留问题" :label-width="formLabelWidth1" prop="openPoint">
                            <el-input  type="textarea" v-model="WxReport.openPoint" :rows="4"></el-input>
                        </el-form-item>
                        <el-form-item label="现场工作是否完成" :label-width="formLabelWidth1">
                            <el-radio-group v-model="WxReport.workCompletedOnsite" class="radioCheck" @change="selectWord">
                                <el-radio :label="item.label" v-for="(item,index) in isNeed" :key="index">{{item.value}}</el-radio>
                            </el-radio-group>
                        </el-form-item>
                            <el-form-item label="维修评价" :label-width="formLabelWidth1" prop="taskGrade">
                            <el-input   v-model="WxReport.taskGrade" :rows="4"></el-input>
                        </el-form-item>
                            <el-form-item label="维修评价描述" :label-width="formLabelWidth1" prop="jobDescript">
                            <el-input  type="textarea" v-model="WxReport.jobDescript" :rows="4"></el-input>
                        </el-form-item>
                        <el-form-item label="评价人" :label-width="formLabelWidth1" prop='gradeCreator'>
                            <el-input  v-model="WxReport.gradeCreator" :rows="4"></el-input>
                        </el-form-item>
                    </el-form>
                    <div slot="footer" class="dialog-footer">
                        <el-button type="primary" @click="saveWxResult('formModel')">保存</el-button>
                        <el-button type="primary" @click="dialogFormVisible8= false">关闭</el-button>
                    </div>
                 
                </el-dialog>
                <!-- 服务工程师 -->
                <el-dialog title="选择工程师" :visible.sync="dialogEngineer">
                    <el-form>
                        <el-form-item label="选择实施对象" :label-width="formLabelWidth1">
                            <el-table :data="examineData"  border style="width: 100%" id="table" @select="selectData">
                                <el-table-column type="selection"></el-table-column>
                                <el-table-column type="index"></el-table-column>
                                <el-table-column  prop="userName" label="用户名称"></el-table-column>
                                <el-table-column  prop="phone"  label="电话" width="120"></el-table-column>
                                <el-table-column  prop="roleId"  label="角色"></el-table-column>
                            </el-table>
                        </el-form-item>
                    </el-form>
                    <div>提示:向右滑动查看详细信息</div>
                    <div slot="footer" class="dialog-footer">
                        <!-- <el-button type="primary"  class="prev" >上一页</el-button>
                        <el-button type="primary"  class="next" >下一页</el-button> -->
                        <el-button type="primary"  @click="saveExamineData">保存</el-button>
                        <el-button type="primary"  @click="cancleWxResult">关闭</el-button>
                    </div>
                </el-dialog>
                <!-- 新增维护报告 -->
                <el-dialog title="维护报告填报" :visible.sync="dialogFormVisible9">
                    <el-form :model="addWhReport">
                        <el-form-item label="服务报告编号" :label-width="formLabelWidth1">
                            <el-input v-model="addWhReport.reportCode"></el-input>
                        </el-form-item>
                        <el-form-item label="雷达站" :label-width="formLabelWidth1">
                            <el-select v-model="addWhReport.radarCode">
                                <el-option v-for="(item,index) in whRadar" :key="index" :label="item.orgName" :value="item.orgCode"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="天气" :label-width="formLabelWidth1">
                            <el-select v-model="addWhReport.weather">
                                <el-option v-for="(item,index) in weatherOption" :key="index" :label="item.label" :value="item.value"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="维护保养时间" :label-width="formLabelWidth1">
                                <el-col >
                                <el-date-picker type="date" placeholder="yy-mm-dd" v-model="addWhReport.serviceDate" 
                                style="width: 85%;" ></el-date-picker>
                            </el-col>
                        </el-form-item>
                        <el-form-item label="巡检工程师" :label-width="formLabelWidth1">
                            <el-input v-model="addWhReport.serviceEngineer" @focus="getWhEngineer">
                                <i
                                    class="el-icon-edit el-input__icon"
                                    slot="suffix">
                                </i>
                            </el-input>
                        </el-form-item>
                        <el-form-item label="维护设备" :label-width="formLabelWidth1">
                            <el-input v-model="addWhReport.serviceDevice" @focus="selectDevice">
                                <i
                                    class="el-icon-edit el-input__icon"
                                    slot="suffix">
                                </i>
                            </el-input>
                        </el-form-item>
                        <el-form-item label="维护人" :label-width="formLabelWidth1">
                            <el-input v-model="addWhReport.servicePerson" @focus="getWhWeihuren">
                                <i
                                    class="el-icon-edit el-input__icon"
                                    slot="suffix">
                                </i>
                            </el-input>
                        </el-form-item>
                        <el-form-item label="维护内容" :label-width="formLabelWidth1">
                            <el-input  type="textarea" v-model="addWhReport.serviceContent"></el-input>
                        </el-form-item>
                        <el-form-item label="维护结果" :label-width="formLabelWidth1">
                            <el-input  type="textarea" v-model="addWhReport.serviceResult" :rows="4"></el-input>
                        </el-form-item>
                    </el-form>
                    <div slot="footer" class="dialog-footer">
                        <el-button type="primary" @click="saveWhResult">确定</el-button>
                        <el-button type="primary" @click="dialogFormVisible9= false">关闭</el-button>
                    </div>
                </el-dialog>
                <!-- 维护设备 弹窗 -->
                <el-dialog title="选择设备" :visible.sync="dialogDevice">
                     <el-form class="dataTree">
                        <el-form-item label="选择实施对象" :label-width="formLabelWidth1">
                            <el-tree 
                                :data="deviceData"
                                :props="defaultProp"
                                highlight-current
                                @node-click="handleDevice"
                                v-loading="loading"
                            >
                            <!--     -->
                            <span class="custom-tree-node" slot-scope="{ node, data }">
                                <span><img :src="node.icon" />{{node.label}}</span>
                            </span>
                            </el-tree>
                        </el-form-item>
                    </el-form>
                    <div slot="footer" class="dialog-footer">
                        <el-button type="primary"  @click="saveDeviceList">保存</el-button>
                        <el-button type="primary"  @click="dialogDevice = false">关闭</el-button>
                    </div>
                </el-dialog>
                <!-- 维护人弹窗 -->
                <el-dialog title="选择维护人" :visible.sync="dialogServicePerson">
                    <el-form>
                        <el-form-item label="选择实施对象" :label-width="formLabelWidth1">
                            <el-table :data="examineData"  border style="width: 100%" id="table" @select="selectServicePerson">
                                <el-table-column type="selection"></el-table-column>
                                <el-table-column type="index"></el-table-column>
                                <el-table-column  prop="userName" label="用户名称"></el-table-column>
                                <el-table-column  prop="phone"  label="电话" width="120"></el-table-column>
                                <el-table-column  prop="roleId"  label="角色"></el-table-column>
                            </el-table>
                        </el-form-item>
                    </el-form>
                    <div>提示:向右滑动查看详细信息</div>
                    <div slot="footer" class="dialog-footer">
                        <!-- <el-button type="primary"  class="prev" >上一页</el-button>
                        <el-button type="primary"  class="next" >下一页</el-button> -->
                        <el-button type="primary"  @click="saveExamineData">保存</el-button>
                        <el-button type="primary"  @click="cancleWxResult">关闭</el-button>
                    </div>
                </el-dialog>
                <!-- 新增巡检报告 -->
                <el-dialog title="巡检报告填报" :visible.sync="dialogFormVisible10">
                    <el-form :model="xjReport">
                        <el-form-item label="服务报告编号" :label-width="formLabelWidth1">
                            <el-input v-model="xjReport.reportCode"></el-input>
                        </el-form-item>
                        <el-form-item label="雷达站" :label-width="formLabelWidth1">
                            <el-input v-model="xjReport.radarCode"></el-input>
                        </el-form-item>
                        <el-form-item label="巡检工程师" :label-width="formLabelWidth1">
                            <el-input v-model="xjReport.serviceEngineer" @focus="getWhEngineer">
                                <i
                                    class="el-icon-edit el-input__icon"
                                    slot="suffix">
                                </i>
                            </el-input>
                        </el-form-item>
                        <el-form-item label="巡检项目列表(可向右滑动)" :label-width="formLabelWidth1">
                            <el-table :data="xjList" border>
                                <el-table-column type="index" width="50" fixed></el-table-column>
                                <el-table-column prop="nodeName" label="巡检项目" width="215"></el-table-column>
                                <el-table-column prop="" label="描述" width="215">
                                    <template slot-scope="scope">
                                        <div class="tableList">
                                            <el-input size="small" v-model="scope.row.descript"></el-input>
                                        </div>
                                    </template>
                                    
                                </el-table-column>
                                <el-table-column prop="itemType" label="状态值" width="215">
                                    <template slot-scope="scope">
                                        <div class="tableList" v-if="scope.row.itemType == 'PERIOD'">
                                            <el-date-picker type="date"  v-model="lastDate" style="width: 80%;"></el-date-picker>
                                        </div>
                                        <div class="tableList1" v-else-if="scope.row.itemType == '0'">
                                            <el-select v-model="xjReState">
                                                <el-option v-for="(item,index) in xjState"
                                                :label="item.label" 
                                                :value="item.value" 
                                                :key="index">
                                                </el-option>
                                            </el-select>
                                        </div>
                                        <div v-else-if="scope.row.itemType == 'FAZHI'" class="tableList">
                                            <el-input size="small" v-model="xjReState1"></el-input>
                                        </div>
                                        <div v-else></div>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </el-form-item>
                        <el-form-item label="巡检意见" :label-width="formLabelWidth1">
                            <el-input  type="textarea" v-model="addWhReport.serviceContent"></el-input>
                        </el-form-item>
                        <el-form-item label="维护接口人意见" :label-width="formLabelWidth1">
                            <el-input  type="textarea" v-model="addWhReport.serviceResult" :rows="4"></el-input>
                        </el-form-item>
                    </el-form>
                    <div slot="footer" class="dialog-footer">
                        <el-button type="primary">确定</el-button>
                        <el-button type="primary" @click="dialogFormVisible10= false">关闭</el-button>
                    </div>
                </el-dialog>
                <!-- 查看报告 弹窗 -->
                <el-dialog title="查看报告" :visible.sync="dialogFormVisible3">
                    <el-form :model="checkReport">
                        <el-form-item label="服务报告编号" :label-width="formLabelWidth1">
                            <el-input v-model="checkReport.reportCode" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="用户" :label-width="formLabelWidth1">
                            <el-input v-model="checkReport.customer" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="地点" :label-width="formLabelWidth1">
                            <el-input v-model="checkReport.site" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="日期" :label-width="formLabelWidth1">
                             <el-col >
                                <el-date-picker type="date" placeholder="yy-mm-dd" v-model="checkReport.serviceDate" 
                                style="width: 85%;" ></el-date-picker>
                            </el-col>
                        </el-form-item>
                        <el-form-item label="服务工程师" :label-width="formLabelWidth1">
                            <el-input v-model="checkReport.servicEngineer"></el-input>
                        </el-form-item>
                        <el-form-item label="服务项目" :label-width="formLabelWidth1">
                            <el-radio-group v-model="checkReport.installation"  class="radioCheck">
                                <el-radio :label="item.label" v-for="(item,index) in isInstallation" :key="index">{{item.value}}</el-radio>
                            </el-radio-group>
                        </el-form-item>
                         <el-form-item label="状态描述" :label-width="formLabelWidth1">
                            <el-input  type="textarea" v-model="checkReport.statusDescript"></el-input>
                        </el-form-item>
                        <el-form-item label="故障描述" :label-width="formLabelWidth1">
                            <el-input  type="textarea" v-model="checkReport.problemDescript" :rows="4"></el-input>
                        </el-form-item>
                         <el-form-item label="处理措施" :label-width="formLabelWidth1">
                            <el-input  type="textarea" v-model="checkReport.correctiveAction" :rows="4"></el-input>
                        </el-form-item>
                        <el-form-item label="是否需要后续工作" :label-width="formLabelWidth1">
                            <el-radio-group v-model="checkReport.furtherActionRequired" class="radioCheck">
                                <el-radio :label="item.label" v-for="(item,index) in isNeed" :key="index">{{item.value}}</el-radio>
                            </el-radio-group>
                        </el-form-item>
                         <el-form-item label="遗留问题" :label-width="formLabelWidth1">
                            <el-input  type="textarea" v-model="checkReport.openPoint" :rows="4"></el-input>
                        </el-form-item>
                        <el-form-item label="现场工作是否完成" :label-width="formLabelWidth1">
                            <el-radio-group v-model="checkReport.workCompletedOnsite" class="radioCheck">
                                <el-radio :label="item.label" v-for="(item,index) in isNeed" :key="index">{{item.value}}</el-radio>
                            </el-radio-group>
                        </el-form-item>
                         <el-form-item label="维修评价" :label-width="formLabelWidth1">
                            <el-input   v-model="checkReport.taskGrade" :rows="4"></el-input>
                        </el-form-item>
                         <el-form-item label="维修评价描述" :label-width="formLabelWidth1">
                            <el-input  type="textarea" v-model="checkReport.jobDescript" :rows="4"></el-input>
                        </el-form-item>
                         <el-form-item label="评价人" :label-width="formLabelWidth1">
                            <el-input  v-model="checkReport.gradeCreator" :rows="4"></el-input>
                        </el-form-item>
                    </el-form>
                    <div slot="footer" class="dialog-footer">
                        <el-button type="primary" plain >附件图片下载zip</el-button>
                        <el-button type="primary" plain >导出报告</el-button>
                        <el-button type="primary" plain @click="dialogFormVisible3= false">关闭</el-button>
                    </div>
                </el-dialog>
                <!-- 任务清单查看 弹窗 -->
                <el-dialog title="任务清单" :visible.sync="dialogFormVisible2">
                    <el-form :model="checkQd">
                        <el-form-item label="任务名称" :label-width="formLabelWidth1">
                            <el-input v-model="checkQd.taskName" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="任务类型" :label-width="formLabelWidth1">
                            <el-input v-model="checkQd.taskType" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="海事局" :label-width="formLabelWidth1">
                            <el-input v-model="checkQd.marineBoard" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="雷达站" :label-width="formLabelWidth1">
                            <el-input v-model="checkQd.radarStation" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="实施对象" :label-width="formLabelWidth1">
                            <el-input v-model="checkQd.implementDest" disabled></el-input>
                        </el-form-item>
                        <el-form-item label="实施时间" :label-width="formLabelWidth1">
                            <el-col >
                                <el-date-picker type="date" placeholder="yy-mm-dd" v-model="checkQd.planImplementDate" 
                                style="width: 85%;" ></el-date-picker>
                            </el-col>
                        </el-form-item>
                         <el-form-item label="工作量(天)" :label-width="formLabelWidth1">
                            <el-input v-model="checkQd.workload"></el-input>
                        </el-form-item>
                        <el-form-item label="任务内容" :label-width="formLabelWidth1">
                            <el-input  type="textarea" v-model="checkQd.taskContent" :rows="4"></el-input>
                        </el-form-item>
                    </el-form>
                    <div slot="footer" class="dialog-footer">
                        <el-button type="primary" plain @click="dialogFormVisible2= false">关闭</el-button>
                    </div>
                </el-dialog>
                <!-- 选择知识库 弹窗 -->
                <el-dialog title="文件目录" :visible.sync="dialogFormVisible6">
                    <el-form :model="fileList">
                        <el-form-item label="关键字" :label-width="formLabelWidth1">
                            <el-input  v-model="fileList.keyword"></el-input>
                        </el-form-item>
                        <el-form-item label="文字说明" :label-width="formLabelWidth1">
                            <el-input  v-model="fileList.comment"></el-input>
                        </el-form-item>
                        <el-form-item label="选择知识库" :label-width="formLabelWidth1"  id="fileTree">
                            <el-tree 
                                :data="treeList"
                                :props="defaultProps"
                                highlight-current
                                @node-click="handleNodeClick"
                            >
                            <span class="custom-tree-node" slot-scope="{ node, data }">
                                <span><img src="../../../public/image/mulu.png" />{{node.label}}</span>
                            </span>
                            </el-tree>
                        </el-form-item>
                    </el-form>
                    <div slot="footer" class="dialog-footer">
                        <el-button type="primary" plain @click="saveTreeInfo">保存</el-button>
                        <el-button type="primary" plain @click="dialogFormVisible6 = false">关闭</el-button>
                    </div>
                </el-dialog>
            </mt-tab-container-item>
        </mt-tab-container>
    </div>
</template>
<script>
	import workProgress from './js/workProgress.js';
	export default workProgress
</script>
<style scoped lang="scss" src="./scss/workProgress.scss">
//   @import "./scss/workProgress.scss";
    
</style>
